package user;

import book.BookList;
import ioperation.*;
import sun.net.util.IPAddressUtil;

public class AdminUser extends User{
    @Override
    public void menu() {
        System.out.println("亲爱的"+name+"管理员，欢迎来到图书管理系统!");
        System.out.println("请选择你的操作:");
        System.out.println("1.添加书籍");
        System.out.println("2.删除书籍");
        System.out.println("3.查找书籍");
        System.out.println("4.显示书籍");
        System.out.println("0.退出系统");

    }



    public AdminUser(){
        this.bookListOperations = new IOperation[]{
            new ExitOperation(),
            new AddOperation(),
            new DelOperation(),
            new FindOperation(),
            new DisplayOperation(),
        };

    }
    public void callPosMethod(int choice, BookList bookList){
        bookListOperations[choice].word(bookList);
    }

}
